<?php
/* 
 * Amnesia is Copyright (c) 2010 Mark Russell
 * 
 * Contact: info@amnesia-app.com	
 * 
 * This file is part of Amnesia.
 * 
 * Amnesia is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Amnesia is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Amnesia. If not, see <http://www.gnu.org/licenses/>.
 *
 */

include '../db/db.php';

$firstname = mysql_real_escape_string ($_POST[firstname]);
$lastname = mysql_real_escape_string ($_POST[lastname]);
$check_string = mysql_real_escape_string ($_POST[check_string]);
$username = mysql_real_escape_string ($_POST[username]);


$query = "UPDATE `user` SET `firstname`= '" . $firstname . "', `lastname`= '" . $lastname . "', `check`= '" . $check_string . "', `timeout`= '600' WHERE `username`= '" . $username . "'";

// Run the query
if(!($result = @ mysql_query ($query, $con)))
	showerror();

mysql_close($con);
?>